package com.phiture.erp.produce.core.pojo.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Schema(description = "管理后台 - 生产任务新增/修改 Request DTO")
@Data
public class ErpProductionTaskSaveReqDTO {

    @Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18362")
    private Long id;

    @Schema(description = "任务名称")
//    @NotEmpty(message = "任务名称不能为空")
    private String name;

    @Schema(description = "任务单编码", requiredMode = Schema.RequiredMode.REQUIRED)
    private String productionTaskNo;

//    @Schema(description = "主计划编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "12077")
//    @NotNull(message = "主计划编码不能为空")
//    private String productMainPlanNo;

    @Schema(description = "物料ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7434")
    @NotNull(message = "物料ID不能为空")
    private Long materialId;

    @Schema(description = "物料", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
    @NotEmpty(message = "物料不能为空")
    private String materialName;

    @Schema(description = "物料编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.10")
    @NotEmpty(message = "物料编码不能为空")
    private String materialNumber;

    @Schema(description = "物料规格")
    private String materialSpec;

    @Schema(description = "物料单位", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "物料单位不能为空")
    private String materialUnit;

    @Schema(description = "计划生产数量", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "计划生产数量不能为空")
    private Integer plannedQuantity;

    @Schema(description = "实际生产数量")
    private Integer actualQuantity;

    @Schema(description = "工艺路线", example = "2815")
    private Long produceRoutingId;

//    @Schema(description = "优先级(1-紧急 2-高 3-中 4-低)")
//    private Integer priority;

    @Schema(description = "开工时间")
    private Date startWorkTime;

    @Schema(description = "完工时间")
    private Date endWorkTime;

    @Schema(description = "备注", example = "你猜")
    private String remark;

//    @Schema(description = "生产任务单物料清单列表")
//    private List<ErpProductionTaskMaterialDO> productionTaskMaterials;
//
//    @Schema(description = "生产任务单工序列表")
//    private List<ErpProductionTaskProcessesDO> productionTaskProcessess;

}